package com.eascs.workflow.wf.service;

import java.util.List;
import java.util.Map;

import com.eascs.app.dao.PageResult;
import com.eascs.web.sso.User;
import com.eascs.workflow.common.entity.wf.ProcessNodeTemplate;
import com.eascs.workflow.common.entity.wf.ProcessTaskMain;
import com.eascs.workflow.common.entity.wf.ProcessTaskNode;
import com.eascs.workflow.common.vo.ModelResult;
import com.eascs.workflow.common.vo.NodeApprovalVo;
import com.eascs.workflow.common.vo.ProcessTimeParam;
import com.eascs.workflow.common.vo.ProcessTimeVo;
import com.eascs.workflow.common.vo.UserTaskParam;
import com.eascs.workflow.common.vo.UserTaskVo;
import com.eascs.workflow.wf.entity.WorkWarnEntity;
import com.eascs.workflow.wf.vo.SignTypeExportVo;

public interface WFQueryService {

	public ModelResult<ProcessNodeTemplate> queryNodeTemplateById(String nodeId);

	/**
	 * 查询经办、待办流程列表
	 * @param page
	 * @param auditorNo (用户userNo)
	 * @param approvalStatus (签报状态-ApprovalQueryType)
	 * @param systemModule	系统模块
	 * @return
	 */
	public ModelResult<PageResult<UserTaskVo>> queryUserTaskByPage(UserTaskParam userTaskParam);
	
	/**
	 * 查询经办人当前审批流程节点信息，包含该贷款单号的审批历史记录
	 * @param user 当前登录用户
	 * @param nodeAuditorId 	当前节点审核人
	 * @return
	 */
	public ModelResult<NodeApprovalVo> queryApprovalInfo(User user, String nodeAuditorId);

	public ModelResult<ProcessTaskMain> queryTaskMainById(String taskId);
	
	/**
	 * 查询审批意见慨况列表
	 * @param referId
	 * @return
	 */
	public ModelResult<List<ProcessTaskMain>> queryAgreeList(String referId);
	
	/**
	 * 查询审批意见详情
	 * @param taskId
	 * @return
	 */
	public ModelResult<ProcessTaskMain> queryAgreeDetail(String referId, String processType);
	
	/**
	 * 根据节点处理人查询贷款单号
	 * @param nodeAuditorId
	 * @return
	 */
	public ModelResult<String> queryReferIdByNodeAuditorId(String nodeAuditorId);
	
	/**
	 * 查询节点处理人所在查询流程ID
	 * @param nodeAuditorId
	 * @return
	 */
	public ModelResult<String> queryTaskIdByNodeAuditorId(String nodeAuditorId);
	
	/**
	 * 查询贷款单的流程审批时间，供report项目报表使用
	 * @param param
	 * @return
	 */
	public ModelResult<PageResult<ProcessTimeVo>> queryProcessTimes(ProcessTimeParam param);
	
	/**
	 * 查询待办提醒
	 * @return
	 */
	public Map<String,List<WorkWarnEntity>> queryWorkWarnList();
	
	
	/**
	 * 返回省区平台
	 * @return
	 */
	public ModelResult<String> getProvincebyUNITNO(String unitno);
	
	/**
	 * 银行申报审查 加签类型导出
	 * @return
	 */
	public List<SignTypeExportVo> getYHSBSCNodeSignType(String provinceCode, String sDate, String eDate);
	
	/**
	 * 查询节点详情
	 * @param referId
	 * @param processType
	 * @param nodeCode
	 * @return
	 */
	public ProcessTaskNode getTaskNodeDetail(String referId,String processType,String nodeCode);
	
	
	
	public ModelResult<ProcessTaskMain> queryAgreeDetailWithTaskId(String taskId);
	
	public void updateTaskNodeStartDate();
}
